From dacab890cc3b44fe3be59c8df6af48dd135a8a94 Mon Sep 17 00:00:00 2001 From: worktycho Date: Tue, 29 Sep 2015 18:10:04 +0100 Subject: The bottom layer cannot hold a valid spawn point Fixes #2510 --- src/World.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/World.cpp b/src/World.cpp index 824ebf3fa..de0dc6ea5 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -624,6 +624,12 @@ void cWorld::GenerateRandomSpawn(void) bool cWorld::CheckPlayerSpawnPoint(int a_PosX, int a_PosY, int a_PosZ) { + // The bottom layer cannot hold a valid spawn point + if (a_PosY <= 0) + { + return false; + } + // Check that spawnblock and surrounding blocks are neither solid nor water / lava static const struct { -- cgit v1.2.3